package domein;

import java.io.Serializable;

/**
 * Message class to encapsulate server sent messages
 *
 * @author Colin Bundervoet
 * @author Jeroen Pattyn
 */
public class Message implements Serializable
{
    MessageType type;
    String value;

    /**
     * Constructor for Message class
     *
     * @param type MessageType object to define message type for parsing
     * @param value message body string.
     */
    Message(MessageType type, String value) {
        this.type = type;
        this.value = value;
    }

    /**
     * Returns the internal String value associated with this message
     *
     * @return String value encapsuled in this message.
     */
    public String getValue() {
        return value;
    }
}
